<?php
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/config.inc.php');
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/top.inc.php');
?>
<p>
	<a href="index.php">&lt;&lt; Back to Instructors Portal</a><br />
</p>
<h1>Delete Instructor</h1>

<?php
//get num_rows currently in instructors table
$instructor_id = mysql_real_escape_string(strip_tags($_GET['id']));

//initialize variables used to connect to database
$db = "scheduler";
$user = "root";
$pass = "";

$i = 0;

//connect to database
mysql_connect("localhost", $user, $pass);
@mysql_select_db($db);

//select statement
$query="SELECT * FROM instructors WHERE id='$instructor_id'";
$result = mysql_query($query);

//close
mysql_close();

$instructor_fname=mysql_result($result,$i,"first_name");
$instructor_lname=mysql_result($result,$i,"last_name");


echo "<p>Are you sure you want to delete <b>$instructor_fname $instructor_lname?</p>";

echo '<form action="delete_do.php" method="post">';
echo "<input type='hidden' name='id' value='$instructor_id'>";

echo '<p><input type="submit" value="Yes"></p>';
echo '</form>';



?>



<?php
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/bottom.inc.php');
?>